<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\External;
use App\Http\Controllers\ExternalJwtController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


//不需要token
Route::prefix('external')->group(function () {

    //Route::post('/index/checkAccount', [External\IndexController::class, 'checkAccount'])->withoutMiddleware(['external_jwt']); // 验证读者证号是否有效
    Route::post('/checkAccount', [External\IndexController::class, 'checkAccount']); // 验证读者证号是否有效 (开发给畅想之星的接口，后期有任何修改都要联系畅想之星)


});

//token必选
Route::middleware(['check.external.token'])->prefix('external')->group(function () {});

//token可选
Route::middleware(['check.may.external.token'])->prefix('external')->group(function () {});
